﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jy123.DBUtility;

namespace Jy123.BLL.Public
{
    public abstract class Module<T>
    {
        
        /// <summary>
        /// 组件升级(条件)
        /// </summary>
        /// <param name="id">组件ID</param>
        /// <param name="ckey">条件组</param>
        /// <param name="cvalue">条件值组</param>
        /// <param name="money">升级所需金钱</param>
        /// <returns>成功失败</returns>
        public abstract bool LevelUpByCondition(int id, List<string> cKey, List<int> cValue, decimal money);
       
        /// <summary>
        /// 返回组件对象
        /// </summary>
        /// <param name="id">组件ID</param>
        /// <returns>该类型组件对象组</returns>
        public abstract List<T> FriendsModule(int id);
        /// <summary>
        /// 返回组件列表
        /// </summary>
        /// <param name="field">列名</param>
        /// <param name="count">总数</param>
        /// <param name="order">排序类型([T]asc[F]Desc)</param>
        /// <returns>该类型组件对象组</returns>
        public abstract List<T> OrderModule(string field, int count, bool order);
        /// <summary>
        /// 返回好友组件列表
        /// </summary>
        /// <param name="id">组件ID</param>
        /// <param name="field">列名</param>
        /// <param name="count">总数</param>
        /// <param name="order">排序类型([T]asc[F]Desc)</param>
        /// <returns>该类型组件对象组</returns>
        public abstract List<T> OrderMFriend(int id, string field, int count, bool order);
    }
}
